function toggle_slide(param)
{
	$('#'+param).slideToggle()
}

//####### TOOLBAR ONCLICK EVENTS

	// New note
	$('#tools_new_note').click(function() {
		toggle_slide('note_new_form') // see tools.js
		$('#tools_new_note').toggleClass('li-hover')
	})
	
	// RSS Archives
	$('#tools_rss_archives').click(function() {
		$.ajax({
			type: "POST",
			url: "controllers/articles_controller.php",
			data: {action:'show'},
			success: function(msg){
				    	$("#page").html(msg)
			}
		});
		$('#tools_rss_archives').toggleClass('li-hover')
	})
	
	// Categories
	$('#tools_categories').click(function() {
		$.ajax({
			type: "POST",
			url: "controllers/categories_controller.php",
			data: {action:'show'},
			success: function(msg){
		    	$("#page").html(msg)
			}
		});
		$('#tools_categories').toggleClass('li-hover')
	})
	
	// Preferences
	$('#tools_preferences').click(function() {
		$.ajax({
			type: "POST",
			url: "controllers/preferences_controller.php",
			data: {action:'show'},
			success: function(msg){
		    	$("#page").html(msg)
			}
		});
		$('#tools_preferences').toggleClass('li-hover')
	})
	
	// Logout
	$('#tools_logout').click(function() {
		if(confirm("Log out ?"))
			window.location = "logout.php";
	})